﻿using System;
using System.Runtime.InteropServices;

namespace Hardcodet.Wpf.TaskbarNotification.Interop
{
	/// <summary>
	/// Callback delegate which is used by the Windows API to
	/// submit window messages.
	/// </summary>
	public delegate long WindowProcedureHandler(IntPtr hwnd, uint uMsg, uint wparam, uint lparam);

	/// <summary>
	/// Win API WNDCLASS struct - represents a single window.
	/// Used to receive window messages.
	/// </summary>
	[StructLayout(LayoutKind.Sequential)]
	public struct WindowClass
	{
		/// <summary>
		/// 
		/// </summary>
		public uint style;

		/// <summary>
		/// 
		/// </summary>
		public WindowProcedureHandler lpfnWndProc;

		///<summary>
		///</summary>
		public int cbClsExtra;

		///<summary>
		///</summary>
		public int cbWndExtra;

		///<summary>
		///</summary>
		public IntPtr hInstance;

		///<summary>
		///</summary>
		public IntPtr hIcon;

		///<summary>
		///</summary>
		public IntPtr hCursor;

		///<summary>
		///</summary>
		public IntPtr hbrBackground;

		///<summary>
		///</summary>
		[MarshalAs(UnmanagedType.LPWStr)]
		public string lpszMenuName;

		///<summary>
		///</summary>
		[MarshalAs(UnmanagedType.LPWStr)]
		public string lpszClassName;
	}
}